<div class="row">
 <small>
 <div class="span3 bs-docs-sidebar ">
 	<*include file="<*$controller*>/location.tpl"*>
  </div>
 
  <div class="span8">
     <div class="clearfix span8" style="background-color:#f8f8f8; padding:10px; margin:10px 0px;"> 
		<a href="/<*$controller*>/store">库存</a> >> 导入库存卡  
	 </div>	    
				<form method="post" enctype="multipart/form-data" name="form1" id="form1">
				<div>
					<table class="table table-condensed table-bordered table-hover span9">
						<tr>
							<th></th>
							<td>如没有excel模版文件请点击&nbsp;&nbsp;<a href="/excelmode/cardmode.xls">Excel 2003下载</a>&nbsp;&nbsp;<a href="/excelmode/cardmode.xlsx">Excel 2007下载</a></td>
						</tr>
						<tr>
							<th><font color="red">*</font>&nbsp;导入数据：</th>
							<td><input type="file" name="filename" id="filename" /></td>
						</tr>
						<tr>
							<th></th>
							<td >
							<input type="button" id="subs" value="检测" class="btn btn-success"  onclick="submits('/punch/detectexcel')" />&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="button"  id="sub" value="导入数据" class="btn btn-success"  onclick="submits('/punch/addexcel')" />&nbsp;&nbsp;&nbsp;&nbsp;
							<input onclick="history.back();" type="button" class="btn btn-success"   value="返回" />
							</td>
						</tr>	
					</table>
				</div>
				</form>
    </div>
    </small> 
     
<!-- <script type="text/javascript" src="/js/prototype.js"></script>  -->
<script type="text/javascript">
function submits(url){
	var file=document.getElementById('filename').value;
	var sub = document.getElementById('sub');
	var subs = document.getElementById('subs');	
	if(file=="" ||file==null){
		alert('请选择上传文件');
		return ;
	}
	sub.disabled='disabled'; 
	subs.disabled='disabled';
	document.form1.action = url;
	document.form1.submit();
}
</script>
 </div> 